//
//  Router.swift
//  YOKO
//
//  Created by 鲁浩 on 16/5/6.
//  Copyright © 2016年 guozhzh. All rights reserved.
//

import Foundation

let TIMESTAMP = "timestamp"
let SESSION_KEY = "session_key"

let CATEGORY_SYSTEM = "system";
let CATEGORY_USER = "user";

let SOURCE_MAIN = "main";
let SOURCE_DEADLINE = "deadline";
let SOURCE_USER = "user";

class Config {
    static func getAccessToken() -> String {
        return NSUserDefaults.standardUserDefaults().stringForKey("access_token")!
    }
    static func getRefreshToken() -> String {
        return NSUserDefaults.standardUserDefaults().stringForKey("refresh_token")!
    }
    static func getPhone() -> String {
        return NSUserDefaults.standardUserDefaults().stringForKey("phone_number")!
    }
    static func getCurrentCalendar() -> Calendar {
        return uiRealm.objects(Calendar).filter("calendarId = %@", NSUserDefaults.getCurrentCalendarId()).first!
    }
}